#ifndef _SDK_PWM_H_
#define _SDK_PWM_H_

#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <getopt.h>

#define DEF_PWM_100HZ_VAL                       10000000
#define DEF_PWM_100HZ_35PERCENT_VAL             3500000
#define DEF_PWM_100HZ_100PERCENT_VAL            10000000

#define DEF_PWM_DUTY                            20
#define DEF_PWM_PERIOD_STEP_SIZE                500
#define DEF_PWM_PERIOD_CLOSE                    60000
#define DEF_PWM_PERIOD_OPEN                     27000
#define DEF_PWM_PERIOD_LOW_BRIGHTNESS           38000
#define DEF_PWM_PERIOD_PET_APPEAR               28000

typedef enum
{
    E_CHIP_SDK_PWM0 = 0,
    E_CHIP_SDK_PWM1,
    E_CHIP_SDK_PWM2,
    E_CHIP_SDK_PWM3,
    E_CHIP_SDK_PWM4,
    E_CHIP_SDK_PWM_MAX_NUM,
}EnChipSdkPwmNum;

void Ext_SdkPwm_Init(int num);
void Ext_SdkPwm_Destroy(int num);
void Ext_SdkPwm_100Hz_Move(int num,long long duty_ns);
void Ext_SdkPwm_Set_Gradual_Change(int num,long long duty_ns,long long period_ns);
void Ext_SdkPwm_Set(int num,long long duty_ns,long long period_ns);

#endif
